﻿namespace EasyToolkit.Excel.BindingTemplates.Definitions
{
    using EasyToolkit.BindingTemplates.Definitions;
    using Microsoft.Office.Interop.Excel;

    class ExcelHeaderOrFooterTemplateDefinition : ExcelTemplateDefinitionPart
    {
        public ExcelTemplateDefinition Parent
        { get; private set; }

        public bool IsHeader
        { get; private set; }

        #region .ctors
        public ExcelHeaderOrFooterTemplateDefinition(bool isHeader, string name, ExcelTemplateDefinition parent, Range templateDeclarationFirstRange, Range templateDeclarationLastRange, TemplateOption templateOption)
                                                    : base(name, parent)
        {
            IsHeader = isHeader;
            Parent = parent;
            //SelectionChanged = parent.SelectionChanged;
            ContextualMenu = parent.ContextualMenu;

            ParsePartTemplate(templateDeclarationFirstRange, templateDeclarationLastRange);
        }
        #endregion
    }
}
